import request from "@/utils/request";

// 查询新闻管理列表
export function listBizNews(query) {
  return request({
    url: "/biz/bizNews/list",
    method: "get",
    params: query,
  });
}

// 查询新闻管理详细
export function getBizNews(id) {
  return request({
    url: "/biz/bizNews/" + id,
    method: "get",
  });
}

export function targetLinkNew() {
  return request({
    url: "/biz/bizNews/targetLink",
    method: "get",
  });
}

// 新增新闻管理
export function addBizNews(data) {
  return request({
    url: "/biz/bizNews",
    method: "post",
    data: data,
  });
}

// 修改新闻管理
export function updateBizNews(data) {
  return request({
    url: "/biz/bizNews",
    method: "put",
    data: data,
  });
}

// 删除新闻管理
export function delBizNews(id) {
  return request({
    url: "/biz/bizNews/" + id,
    method: "delete",
  });
}

// 查询最大编号
export function findMaxSort() {
  return request({
    url: "/biz/bizNews/findMaxSort",
    method: "get",
  });
}
// 导出新闻管理
export function exportBizNews(query) {
  return request({
    url: "/biz/bizNews/export",
    method: "get",
    params: query,
  });
}
